package com.github.jiatao.floatview.sample;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

import com.github.jiatao.floatview.FloatViewManger;

public class MainActivity extends Activity {

    private FloatViewManger floatView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        floatView = FloatViewManger.getInstance(this);
        floatView.show();
    }


    public void createFloat(View view) {
        floatView = FloatViewManger.getInstance(this);
        floatView.show();
    }

    public void destoryFloat(View view) {
        floatView.desroty();
    }

    @Override
    protected void onResume() {
        super.onResume();

        floatView.show();
    }


    @Override
    protected void onStop() {
        super.onStop();

        floatView.hide();
    }

    @Override
    protected void onDestroy() {
        floatView.desroty();

        super.onDestroy();

    }

}
